package com.puzzlebazar.client.util;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Button;

public abstract class Tool extends Button implements Executable {
	
	/**
	 * Creates a new tool identified by the passed text.
	 * 
	 * @param text The text to write on the button
	 */
	public Tool( String text ) {
		super( text );
		
		addClickHandler( new ClickHandler() {
			@Override
			public void onClick(ClickEvent event) {
				execute();
			}			
		});
	}
	
	
}
